package com.itheima.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealCheckGroupMapper {

    void add(Integer[] checkgroupIds, Integer setmealId);

    @Delete("delete from t_setmeal_checkgroup where setmeal_id = #{setmealId}")
    void deleteById(Integer setmealId);

    @Select("select checkgroup_id from t_setmeal_checkgroup where setmeal_id = #{setmealId}")
    List<Integer> findCheckGroupIdsBySetmealId(Integer setmealId);
}
